The present invention relates to a method and an apparatus for money processing such as receiving, sorting, paying-out and the like of money, and more particularly to a money processing method and apparatus which can store and hold the number of stored money to be used as change in a battery-backup memory and initialize the number of stored money retained in the memory with an appropriate timing.
A money processor used in automatic vending machines, money-changing machines, etc receives money inserted and pays-out change if necessary. Money to be paid-out as change are chiefly coins which are stored in coin tubes for respective types of coins. A cassette-type coin tube is also available, which is detachable from the money processor so that it is easy to supply coins and to change the capacity for holding each type of coin (see Japanese Patent Application laid-Open No. 60-55486).
A sensor (hereinafter, it is called the empty switch) is attached to the coin tube at a given height from its bottom to detect the presence or not of coins, and it is judged from the detected result by the empty switch whether change can be paid-out or not. For example, when thirteen (13) coins or more are stored in the coin tube, the empty switch is set at the position where these coins can be detected. If the empty switch had a detection error of three coins or less, it detects that 13xc2x13 coins or more are stored in the coin tube. Therefore, when the empty switch detects that coins are stored in the coin tube, it means that at least ten coins are stored in the coin tube.
However, if it is judged whether change can be paid-out based only on the detected result by the empty switch, when the coins stored in the coin tube are decreased to nine coins or less, it is judged that the pertinent type of money can not be paid-out, hence even though the change can actually be paid-out, a commodity that requires change is stopped from being sold, resulting in loosing an opportunity of selling. Therefore, a counter is provided in addition to the empty switch to count the number of received coins or paid-out coins, and based on the counted result, it is judged whether change can be paid-out or not.
FIG. 5 is a flowchart showing a process of counting the number of stored coins by the counter.
The counter starts its operation when the power of the money processor is turned on (step 601). At this time, if the number of coins stored in the coin tube is nine or less, that is, if the empty switch detects a state of no coin (NO in step 602), since it is unknown how many coins are stored in the coin tube, the counter keeps its value as zero. When the empty switch indicates the presence of coins or indicates that no coins state is changed to the presence of coins by receiving coins (YES in step 602), since at least ten coins are stored in the coin tube, the value of the counter is preset to ten (step 603).
Here, when a sensor (hereinafter, it is called the full coin switch), which is located at a predetermined position at an upper part the coin tube, for detecting whether the coin tube is full, has detected that the coin tube is full (YES in step 604), the counter value is preset to hundred (100) (when the full coin switch detects that the coin tube is full, the coin tube shall contain at least 100 coins) (step 605).
Next, when the pertinent type of coin is inserted and stored into the coin tube (YES in step 606), one is added to the value of the counter (step 607). And when a coin is paid-out from the coin tube (YES in step 608), one is subtracted from the value of the counter (step 609).
When the counter value changes from ten to nine as a result of the increase and decrease of the coins in the coin tube (YES in step 610) and the empty switch indicates the presence of coins (YES in step 611), the counter indicates that nine coins are in the coin tube while the empty switch indicates that at least ten coins are stored in the coin tube. Therefore, the value of the counter is preset to ten (step 603).
Moreover, when the coins in the coin tube are increased and decreased and the empty switch indicates a change from a state showing the presence of coins to a state showing no coin (YES in step 612), it shows that the number of coins stored in the coin tube has become 12xc2x13. Then, the value of the counter is preset to nine (step 613). When the empty switch indicates a change from a state showing no coin to a state showing the presence of coins (YES in step 614), it shows that the number of coins stored in the coin tube has become 13xc2x13. Then, the value of the counter is preset to ten (step 615).
When the counter value is changed as described above, the counter value does not necessarily correspond to the number of coins stored in the coin tube. For example, when the power supply is turned on with eighty coins stored in the coin tube, the counter value is ten, and with five coins stored in the coin tube, the counter value becomes 0. Therefore, the former case is judged that change cannot be paid-out though it can actually be paid (for example, where one 500-yen coin is inserted to buy a 350-yen commodity and a 100-yen coin tube has no 100-yen coin, a 50-yen coin tube has no 50-yen coin and a 10-yen coins can be paid-out as change.
However, it is judged that no change can be paid-out when the value of the counter which corresponds to the 10-yen coin tube is ten. And, in the latter case, even if change can be actually paid-out (for example, five coins are stored), it is judged that the pertinent type of money can not be paid-out.
However, when the empty switch and the full coin switch indicate a change with the increase and decrease of coins after turning on the power (YES in steps 604, 612, 614), the counter value is preset to a value which substantially corresponds to the number of coins stored in the coin tube. After that, judgement on a possibility of paying-out change based on the counter value is made accurately.
Therefore, frequency of resetting the counter value is desirably few, but since the counter value is reset when the power is interrupted, turned on again or fails (including an instantaneous power failure) or the voltage changes, a battery-backup RAM is used to retain the counter value to prevent such resetting.
However, when the counter value is retained in the battery-backup RAM, the counter value can be kept even when the power is cut off for maintenance of the automatic vending machine, the money processor, etc. and the coins are collected from the coin tube or the tube cassettes are exchanged at the same time Therefore, the counter value might be larger than the number of coins actually stored in the coin tube. In this case, judgment of the change pay-out is not made correctly, possibly resulting in a failure of not paying change.
In view of the circumstances described above, it is an object of the present invention to provide an method and an apparatus for processing money which can retain a value obtained by counting the number of coins stored in a coin tube in a battery-backup RAM and does not initialize the retained counter value more than necessary but initializes it with appropriate timing.
To achieve the object described above, the invention is characterized by a method of money processing in which inserted money is stored in a storage means and money is paid-out from the money stored in the storage means, wherein the number of money stored in the storage means is counted based on the number of money stored in the storage means and the number of money paid-out from the storage means, the counted number of money and the states of respective parts are held in memory means which can hold information irrelevant of the power on or off, and the number of money held in the memory means is initialized if the state when the power supply is turned on is different from the state held in the memory means.
The invention is also characterized by the method described above, wherein the money stored in the storage means are coins; and the number of coins being stored in the storage means is counted based on the number of coins stored in the storage means and the number of coins paid-out from the storage means, the counted number of coins and the states of respective parts are held in the memory means which can hold information irrelevant of the power on or off, and the number of coins retained in the memory means is initialized if the state when the power supply is turned on is different from the state retained in the memory means.
The invention is also characterized in that when an empty switch for detecting that the number of coins stored in the storage means becomes a predetermined number or below has different detection output before the power cut-off and after the power on, the number of money retained in the memory means is initialized.
The invention is further characterized in that when a full switch for detecting that the storage means for holding the coins is full has different detection output before the power cut-off and after the power on, the number of money retained in the memory means is initialized.
The invention is also characterized by the storage means is detachable from a money processing apparatus and provided in a plurality of number of types; and when a type of storage means before the power cut-off is different from a type of storage means at the power on, the number of coins retained in the memory means is initialized.
The invention also provides that predetermined data is held in the memory means; and when the predetermined data retained in the memory means is different from the original data at the power on, the number of coins retained in the memory means is initialized.
The invention is characterized by a money processing apparatus including storage means for storing inserted money and pay-out means for paying-out the money from the storage means, wherein the apparatus comprises counting means for counting the number of money being stored in the storage means based on the number of money stored in the storage means and the number of money paid-out from the storage means by the pay-out means; memory means for retaining the number of money counted by the counting means and the states of respective parts regardless of the power on or off; and initializing means for initializing the number of money retained in the memory means when the state at the power on is different from the state retained in the memory means.
The invention is characterized by the money stored in the storage means are coins; and the storage means has at least one coin number detecting means for detecting the number of coins stored in the storage means.
The invention is also characterized by the coin number detecting means is an empty switch which detects that the number of coins stored in the storage means becomes a predetermined number or below; the memory means, when detection output of the empty switch varied, stores the output state; and the initializing means initializes the number of coins retained in the memory means when the state of the empty switch before the interception of the power supply retained in the memory means is different from the state of the empty switch when the power supply is turned on.
The invention is also characterized by the coin number detecting means is a full switch for detecting that coins are full in the storage means; the memory means stores an output state each time a detection output of the full switch varies; and the initializing means initializes the number of coins retained in the memory means when the state of the full switch before the interception of the power supply retained in the memory means is different from the state of the full switch when the power supply is turned on.
The invention is characterized by the storage means is detachable from the money processing apparatus and provided in a plurality of number of types; the memory means retains the types of storage means; and when a type of storage means before the interception of the power supply retained in the memory means is different from a type of storage means at the power on, the initializing means initializes the number of coins retained in the memory means.
The invention is further characterized by a data storage means for storing predetermined data, wherein the memory means retains the predetermined data which is stored in the data storage means; and when the predetermined data retained in the memory means before the power on is different from the data stored in the data storage means, the initializing means initializes the number of coins retained in the memory means.